home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 January / PCWorld_2007-01_cd.bin / v cisle / autoit / autoit-v3.2.0.1-setup.exe / Examples / Helpfile / _GUICtrlStatusBarGetIcon.au3 < prev    next >
Text File  |  2006-08-01  |  1KB  |  34 lines

  1. opt("MustDeclareVars", 1)
  2.  
  3. #include <GUIConstants.au3>
  4. #Include <GuiStatusBar.au3>
  5.  
  6. Local $gui, $StatusBar1, $msg
  7. Local $a_PartsRightEdge[3] = [100, 350, -1]
  8. Local $a_PartsText[3] = ["New Text", "More Text", "Even More Text"]
  9.  
  10. $gui = GUICreate("Status Bar Get Icon", 500, -1, -1, -1, $WS_SIZEBOX)
  11.  
  12. $StatusBar1 = _GUICtrlStatusBarCreate ($gui, $a_PartsRightEdge, $a_PartsText)
  13. _GUICtrlStatusBarSetIcon($StatusBar1, 1, "shell32.dll", 168)
  14. _GUICtrlStatusBarSetIcon($StatusBar1, 0, "shell32.dll", 21)
  15. _GUICtrlStatusBarSetIcon($StatusBar1, 2, "shell32.dll", 24)
  16.  
  17. _GUICtrlStatusBarSetText($StatusBar1, _GUICtrlStatusBarGetIcon($StatusBar1, 0), 0)
  18. _GUICtrlStatusBarSetText($StatusBar1, _GUICtrlStatusBarGetIcon($StatusBar1, 1), 1)
  19. _GUICtrlStatusBarSetText($StatusBar1, _GUICtrlStatusBarGetIcon($StatusBar1, 2), 2)
  20.  
  21. GUISetState(@SW_SHOW)
  22.  
  23. While 1
  24.     $msg = GUIGetMsg()
  25.     Select
  26.         Case $msg = $GUI_EVENT_RESIZED
  27.             _GUICtrlStatusBarResize ($StatusBar1)
  28.         Case $msg = $GUI_EVENT_CLOSE
  29.             ExitLoop
  30.         Case Else
  31.             ;;;;;
  32.     EndSelect
  33.     
  34. WEnd